/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  Dimensions,
  TextInput
} from 'react-native';

let widthOfMargin = Dimensions.get('window').width *0.05;
export default class LearnRN extends Component {
  render() {
    console.log('render run');
    return (
        <View style={styles.container}>
          <TextInput style={styles.textInputStyle}
              placeholder={'Input phone number'}/>
          <Text style={styles.textPrompStyle}>
              Your input phone number:
          </Text>
          <TextInput style={styles.textInputStyle}
              placeholder={'Input password'}
              password={true}/>
          <Text style={styles.bigTextPrompt}>
                OK
          </Text>
        </View>
    );
  }
}
let styles = StyleSheet.create({
      container: {
        flex: 1,
        backgroundColor: 'white',
      },
      TextInputStyle: {
        margin: widthOfMargin,
        backgroundColor: 'gray',
        fontSize: 20,
      },
      textPrompStyle: {
        margin: widthOfMargin,
        fontSize: 20,
      },
      bigTextPrompt: {
        margin: widthOfMargin,
        backgroundColor: 'gray',
        color: 'white',
        textAlign: 'center',
        fontSize: 30,
      }
});
